{% load i18n static %}
<div class="related-widget-wrapper input-group">
    {{ widget }}
    {% block links %}
        {% spaceless %}
            {% if can_change_related %}
            <a class="related-widget-wrapper-link change-related input-group-addon" id="change_id_{{ name }}"
                data-href-template="{{ change_related_template_url }}?{{ url_params }}"
                title="{% blocktrans %}Change selected {{ model }}{% endblocktrans %}">
                <span class="glyphicon glyphicon-pencil">
            </a>
            {% endif %}
            {% if can_add_related %}
            <a class="related-widget-wrapper-link add-related input-group-addon" id="add_id_{{ name }}"
                href="{{ add_related_url }}?{{ url_params }}"
                title="{% blocktrans %}Add another {{ model }}{% endblocktrans %}">
                <span class="glyphicon glyphicon-plus">
            </a>
            {% endif %}
            {% if can_delete_related %}
            <a class="related-widget-wrapper-link delete-related input-group-addon" id="delete_id_{{ name }}"
                data-href-template="{{ delete_related_template_url }}?{{ url_params }}"
                title="{% blocktrans %}Delete selected {{ model }}{% endblocktrans %}">
                <span class="glyphicon glyphicon-trash">
            </a>
            {% endif %}
        {% endspaceless %}
    {% endblock %}
</div>
